package dungnt.vpoint.mathtest;

import android.os.Bundle;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class MainActivity extends Activity implements OnClickListener{

	Button btnPlay, btnMoreGame, btnInformation, btnHighScore;
	Context context;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		context = this;
		
		btnPlay = (Button)findViewById(R.id.btnPlay);
		btnPlay.setOnClickListener(this);
		btnMoreGame = (Button)findViewById(R.id.btnMoreGame);
		btnMoreGame.setOnClickListener(this);
		btnInformation = (Button)findViewById(R.id.btnInformation);
		btnInformation.setOnClickListener(this);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}

	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.btnPlay:
			Intent play_intent = new Intent(this, PlayActivity.class);
			startActivity(play_intent);
			break;
		case R.id.btnMoreGame:
			Intent moregame_intent = new Intent(this, MoreGameActivity.class);
			startActivity(moregame_intent);
			break;
		case R.id.btnInformation:
		    //Intent infor_intent = new Intent(this, InformationActivity.class);
		    Intent infor_intent = new Intent(this, LeaderBoardActivity.class);
		    startActivity(infor_intent);
		    break;
		}
	}

}
